<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
//use Illuminate\Support\Facades\Schema;

class CreateJumpTagTable20230816 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('jump_tag', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('名称');
            $table->string('type')->comment('跳转类型');
            $table->string('data')->nullable('')->comment('跳转参数');
            $table->string('jump_page')->nullable()->comment('内页路径');
            $table->string('jump_app_id')->nullable()->comment('跳转小程序app_id');
            $table->string('jump_app_path')->nullable()->comment('跳转小程序路径');
            $table->tinyInteger('is_show')->default(1)->comment('是否显示 0-否 1-是');
            $table->timestamps();
            $table->comment = '跳转标签表';
        });

        Schema::table('health_note_comments', function (Blueprint $table) {
            $table->string('content')->comment('内容');
        });

        Schema::table('health_note_favorites', function (Blueprint $table) {
            $table->integer('comment_id')->default(0)->index()->comment('评论ID');
        });

        Schema::table('mini_program_bottom_tab', function (Blueprint $table){
            $table->string('action')->nullable()->comment('动作')->change();
            $table->integer('jump_tag_id')->comment('跳转标签ID');
        });

        Schema::table('mini_program_main_tab', function (Blueprint $table){
            $table->string('action')->nullable()->comment('动作')->change();
            $table->integer('jump_tag_id')->comment('跳转标签ID');
        });

        Schema::table('tcmclassics', function (Blueprint $table){
            $table->integer('jump_tag_id')->comment('跳转标签ID');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
    }
}
